/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.vo;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.comac.ins.isfd.domain.IsfdOperatorParameterConfig;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.util.Date;

/**
 * 算子参数配置视图层vo
 *
 * @author hxloongs
 * @date 2024-7-10
 */
@Data
@AutoMapper(target = IsfdOperatorParameterConfig.class)
public class IsfdOperatorParameterConfigVo {

    private String _id;

    private String component;

    private String fieldId;

    private String fieldType;

    private String label;

    private String operatorRefId;

    private String path;

    private String sortOrder;

    private String type;

    private String valueType;

    private Date createTime;

    @JsonIgnore
    private String customJsonField;

    /**
     * 自定义字段，是一个json字段，这里给前端是jsonObject对象
     */
    private JSONObject customJsonFieldObject;

    public JSONObject getCustomJsonFieldObject() {
        return JSONUtil.parseObj(this.customJsonField);
    }

    /**
     * 算子名称
     */
    private String operatorName;

    /**
     * 元数据管理id
     */
    private String metadataManagementId;
}
